home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / doc / libnet-dbus-perl / examples / notification.pl < prev   
Encoding:
Perl Script  |  2008-02-20  |  516 b   |  20 lines

  1. #!/usr/bin/perl
  2.  
  3. use Net::DBus qw(:typing);
  4.  
  5.  
  6. my $bus = Net::DBus->session;
  7.  
  8. my $svc = $bus->get_service("org.freedesktop.Notifications");
  9. my $obj = $svc->get_object("/org/freedesktop/Notifications");
  10.  
  11. $obj->Notify("notification.pl",
  12.          0,
  13.          '',
  14.          "Demo notification",
  15.          "Demonstrating using of desktop\n" .
  16.          "notifications from Net::DBus\n",
  17.          ["done", "Done"],
  18.          {"desktop-entry" => "virt-manager", x => dbus_variant(dbus_int32(200)), y => dbus_variant(dbus_int32(200))},
  19.          2_000);
  20.